namespace Gavel.Common.Utilities.Model;

/// <summary>
/// 网络连接
/// </summary>
public class Connection
{
    /// <summary>
    /// IP地址
    /// </summary>
    public string Ip { get; init; }
    
    /// <summary>
    /// 端口号
    /// </summary>
    public ushort Port { get; init; }

    /// <summary>
    /// 网络连接参数构造
    /// </summary>
    /// <param name="ip">IPV4地址</param>
    /// <param name="port">端口号</param>
    public Connection(string ip, ushort port)
    {
        Ip = ip;
        Port = port;
    }
}